<?php
/**
 * Created by PhpStorm.
 * User: yangfan
 * Date: 2019/11/23
 * Time: 3:32 PM
 */

namespace App\Services\api;

use App\Entity\DistributorEntity;
use App\Entity\TransactionRecordEntity;

/**
 * 用户余额服务
 */
interface IUserBalanceService
{
    /**
     * 用户的可用余额
     * @return int
     */
    public function getUseAbleAmount();

    /**
     * 用户被冻结的余额
     * @return int
     */
    public function getFrozenAmount();

    /**
     * 用户使用余额，返回余额使用记录ID
     * @param $amount
     * @return int
     */
    public function use($amount);

    /**
     * @return DistributorEntity
     */
    public function getDistributorEntity();

    /**
     * 获取余额使用记录
     * @return TransactionRecordEntity[]
     */
    public function getTransactionRecordEntityList();
}
